import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopRefundLogController } from '../../../controllers';
const uctoominishopRefundLogRouter = new Router();
const minishopRefundLogController = new uctooMinishopRefundLogController();

uctoominishopRefundLogRouter.post('/add', requireUser, minishopRefundLogController.add);
uctoominishopRefundLogRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_refund_log'), minishopRefundLogController.edit);
uctoominishopRefundLogRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_refund_log'), minishopRefundLogController.delete);

//For getting minishopRefundLog with permission control
uctoominishopRefundLogRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_refund_log'), minishopRefundLogController.getSingle);
uctoominishopRefundLogRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_refund_log'), minishopRefundLogController.getMany);
uctoominishopRefundLogRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_refund_log'), minishopRefundLogController.getMany);

//#endregion AutoCreateCode
export default uctoominishopRefundLogRouter;
